import csv
import os


def read_error_csv():
    get_dir = os.path.dirname(os.path.abspath(__file__))
    filepath = os.path.join(get_dir, 'account.csv')
    # print(filepath)
    with open(filepath, mode='r', encoding='utf-8') as fp:
        get_result = csv.reader(fp)
        result = [i for i in list(get_result)[1:6]]
    return result


def read_right_csv():
    get_dir = os.path.dirname(os.path.abspath(__file__))
    filepath = os.path.join(get_dir, 'account.csv')
    # print(filepath)
    with open(filepath, mode='r', encoding='utf-8') as fp:
        get_result = csv.reader(fp)
        result = [i for i in list(get_result)[6:]]
    return result


def read_data_csv():
    get_dir = os.path.dirname(os.path.abspath(__file__))
    filepath = os.path.join(get_dir, 'data.csv')
    # print(filepath)
    with open(filepath, mode='r', encoding='utf-8') as fp:
        get_result = csv.reader(fp)
        result = [i for i in list(get_result)[1:6]]
    return result


# print(read_error_csv())
# print(read_right_csv())

if __name__ == '__main__':
    text = read_error_csv()
    text1 = read_right_csv()
    text2 = read_data_csv()
    print(text)
    print(text1)
    print(text2)
